@extends('master')
@section('style')
<style>
	#content{margin-top: 80px;}
</style>
@endsection
@section('content')
<div id="content" class="container">
	<div class="col-md-8 col-sm-8">
	    <div class="panel panel-default">
	        <div class="panel-heading">
	            搜索结果...
	        </div>
	        <div class="panel-body">
	            <ul class="nav nav-tabs">
	                <li class="active"><a href="#article" data-toggle="tab">文章</a> </li>
	                <li class=""><a href="#topic" data-toggle="tab">话题</a> </li>
	                <li class=""><a href="#column" data-toggle="tab">问题</a> </li>
	                <li class=""><a href="#user" data-toggle="tab">用户</a> </li>
	            </ul>

	            <div class="tab-content">
	                <div class="tab-pane fade active in" id="article">
	                    <h4>文章</h4>
	                    <div class="item col-md-12">
	                    	<ul class="list-unstyled">
	                    		@foreach($article as $v)
	                    		<li>
	                    			<h4><a href="/article/{{$v->id}}">{{$v->title}}</a></h4>
	                    			<span class="col-md-12 pull-right" style="color: #999;font-size: 12px;"><b>{{$v->user->name}}</b>发表于{{$v->created_at}}</span>
	                    			<br>
	                    		</li>
	                    		@endforeach
	                    	</ul>
	                    </div>
	                </div>
	                <div class="tab-pane fade" id="topic">
	                    <h4>话题</h4>
	                    <div class="item col-md-12">
	                    	<ul class="list-unstyled">
	                    		@foreach($topic as $v)
	                    		<li>
	                    			<h4><a href="/topic/{{$v->id}}">{{$v->title}}</a></h4>
	                    			<span class="col-md-12 pull-right" style="color: #999;font-size: 12px;"><b>{{$v->user->name}}</b>创建于{{$v->created_at}}</span>
	                    			<br>
	                    		</li>
	                    		@endforeach
	                    	</ul>
	                    </div>
	                </div>
	                <div class="tab-pane fade" id="column">
	                    <h4>问题</h4>
	                    <div class="item col-md-12">
	                    	<ul class="list-unstyled">
	                    		@foreach($question as $v)
	                    		<li>
	                    			<h4>{{$v->title}}</h4>
	                    			<h5><a href="/question/{{$v->id}}.html">{{$v->content}}</a></h5>
	                    			<span class="col-md-12 pull-right" style="color: #999;font-size: 12px;"><b>{{$v->user->name}}</b>发表于{{$v->created_at}}</span>
	                    			<br>
	                    		</li>
	                    		@endforeach
	                    	</ul>
	                    </div>
	                </div>
	                <div class="tab-pane fade" id="user">
	                    <h4>用户</h4>
	                    <div class="item col-md-12">
	                    	<ul class="list-unstyled">
	                    		@foreach($user as $v)
	                    		<li>
	                    			<h4><a href="/show/{{$v->id}}">{{$v->name}}</a></h4>
	                    		</li>
	                    		@endforeach
	                    	</ul>
	                    </div>
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
</div>
@endsection